package com.ocom.netty.mj;


import com.ocom.netty.mj.config.NettyProperties;
import com.ocom.netty.mj.server.Server;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * 启动类
 */
@EnableFeignClients
@SpringBootApplication
@EnableConfigurationProperties(NettyProperties.class)
public class NettyServiceApplication {
    public static void main(String[] args) throws Exception {
        ConfigurableApplicationContext context = SpringApplication.run(NettyServiceApplication.class, args);
        Server server = context.getBean(Server.class);
        server.start();
    }
}

